package com.aracky.assess.mapper;

import com.aracky.assess.model.entity.HrKpiUserPerformanceHeader;
import com.aracky.assess.model.excel.KpiUserHeaderExport;
import com.aracky.assess.model.form.HrKpiUserPerformanceHeaderTimeUpdateForm;
import com.aracky.assess.model.request.HrKpiUserPerformanceHeaderRequest;
import com.aracky.assess.model.vo.HrKpiUserPerformanceHeaderExcelVO;
import com.aracky.assess.model.vo.HrKpiUserPerformanceHeaderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户绩效考核 Mapper 接口
 * </p>
 *
 * @author zzp
 * @since 2022-08-01 09:43:18
 */
@Mapper
public interface HrKpiUserPerformanceHeaderMapper extends BaseMapper<HrKpiUserPerformanceHeader> {

    IPage<HrKpiUserPerformanceHeaderVO> findHrKpiUserPermanceHeader(Page topage, @Param("hkuphr") HrKpiUserPerformanceHeaderRequest hrKpiUserPerformanceHeaderRequest);


    /**
     * 查询导出数据
     * @param hrKpiUserPerformanceHeaderRequest
     * @return
     */
    List<HrKpiUserPerformanceHeaderExcelVO> findHrKpiUserPermanceHeaderExport(@Param("hkuphr") HrKpiUserPerformanceHeaderRequest hrKpiUserPerformanceHeaderRequest);

    /**
     * 根据id修改员工填报、评分时间
     * @param hrKpiUserPerformanceHeaderTimeUpdateForm
     * @return
     */
    Integer updateEndWriteAssessorTimeById(@Param("hkupht") HrKpiUserPerformanceHeaderTimeUpdateForm hrKpiUserPerformanceHeaderTimeUpdateForm);


    /**
     * 根据员工id修改员工填报、评分时间
     * @param hrKpiUserPerformanceHeaderTimeUpdateForm
     * @return
     */
    Integer updateEndWriteAssessorTimeByUserId(@Param("hkupht") HrKpiUserPerformanceHeaderTimeUpdateForm hrKpiUserPerformanceHeaderTimeUpdateForm);

    /**
     * 根据id查询详情进行回显
     * @param id
     * @return
     */
    HrKpiUserPerformanceHeaderVO mySelectById(@Param("id") Long id);
}
